package com.zu.commu.landi2.protocol;

import com.zu.commu.exception.CommuException;

public class OnLineProtocol
{
  public boolean isOnLineData(String s)
    throws Exception
  {
    try
    {
      if ((s.startsWith("@@")) && 
        (s.indexOf("##") > 0) && 
        (s.indexOf("IP:") > 0))
        return true;
    }
    catch (Exception e)
    {
      CommuException ee = new CommuException().setMessage("分析上线数据出错,上线数据是" + s, e);
      throw ee;
    }
    return false;
  }

  public byte[] remoteData()
    throws Exception
  {
    return ReturnData.data();
  }
}